package com.xoa.controller.event;

import com.xoa.model.event.TimeLineViewRole;
import com.xoa.service.event.TimeLineViewRoleService;
import com.xoa.util.ToJson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by 张丽军 on 2017/9/1.
 */
@RestController
@RequestMapping("/timeLineViewRole")
public class TimeLineViewRoleController {
    @Autowired
    TimeLineViewRoleService timeLineViewRoleService;

    /**
     * 创建作者:   张丽军
     * 创建日期:   2017-09-01 下午14:51:25
     * 方法介绍:   修改大事记查看角色信息
     * @param request
     * @param timeLineViewRole
     * @return
     */
    @ResponseBody
    @RequestMapping("/updateTimeLineViewRole")
    public ToJson<TimeLineViewRole> updateTimeLineViewRole(HttpServletRequest request,TimeLineViewRole timeLineViewRole){
        return timeLineViewRoleService.updateTimeLineViewRole(request,timeLineViewRole);
    }

    /**
     * 创建作者:   张丽军
     * 创建日期:   2017-09-01 下午15:01:25
     * 方法介绍:   新建大事记查看角色信息
     * @param request
     * @param timeLineViewRole
     * @return
     */
    @ResponseBody
    @RequestMapping("/addTimeLineViewRole")
    public ToJson<TimeLineViewRole> addTimeLineViewRole(HttpServletRequest request,TimeLineViewRole timeLineViewRole){
        return timeLineViewRoleService.addTimeLineViewRole(request,timeLineViewRole);
    }
}
